3.5.75 \(\int \frac {\cot ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx\) [475]

Optimal. Leaf size=25 \[ -\frac {\cot (e+f x)}{f \sqrt {a \cos ^2(e+f x)}} \]

[Out]

-cot(f*x+e)/f/(a*cos(f*x+e)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3255, 3286, 2686, 8} \begin {gather*} -\frac {\cot (e+f x)}{f \sqrt {a \cos ^2(e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^2/Sqrt[a - a*Sin[e + f*x]^2],x]

[Out]

-(Cot[e + f*x]/(f*Sqrt[a*Cos[e + f*x]^2]))

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 3255

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*cos[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0]

Rule 3286

Int[(u_.)*((b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Di
st[(b*ff^n)^IntPart[p]*((b*Sin[e + f*x]^n)^FracPart[p]/(Sin[e + f*x]/ff)^(n*FracPart[p])), Int[ActivateTrig[u]
*(Sin[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rubi steps

\begin {align*} \int \frac {\cot ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx &=\int \frac {\cot ^2(e+f x)}{\sqrt {a \cos ^2(e+f x)}} \, dx\\ &=\frac {\cos (e+f x) \int \cot (e+f x) \csc (e+f x) \, dx}{\sqrt {a \cos ^2(e+f x)}}\\ &=-\frac {\cos (e+f x) \text {Subst}(\int 1 \, dx,x,\csc (e+f x))}{f \sqrt {a \cos ^2(e+f x)}}\\ &=-\frac {\cot (e+f x)}{f \sqrt {a \cos ^2(e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 25, normalized size = 1.00 \begin {gather*} -\frac {\cot (e+f x)}{f \sqrt {a \cos ^2(e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^2/Sqrt[a - a*Sin[e + f*x]^2],x]

[Out]

-(Cot[e + f*x]/(f*Sqrt[a*Cos[e + f*x]^2]))

________________________________________________________________________________________

Maple [A]
time = 0.30, size = 32, normalized size = 1.28

method result size
default \(-\frac {\cos \left (f x +e \right )}{\sin \left (f x +e \right ) \sqrt {a \left (\cos ^{2}\left (f x +e \right )\right )}\, f}\) \(32\)
risch \(-\frac {2 i \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{\sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}\) \(57\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^2/(a-a*sin(f*x+e)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-cos(f*x+e)/sin(f*x+e)/(a*cos(f*x+e)^2)^(1/2)/f

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 98 vs. \(2 (25) = 50\).
time = 0.57, size = 98, normalized size = 3.92 \begin {gather*} -\frac {2 \, {\left (\cos \left (f x + e\right ) \sin \left (2 \, f x + 2 \, e\right ) - \cos \left (2 \, f x + 2 \, e\right ) \sin \left (f x + e\right ) + \sin \left (f x + e\right )\right )} \sqrt {a}}{{\left (a \cos \left (2 \, f x + 2 \, e\right )^{2} + a \sin \left (2 \, f x + 2 \, e\right )^{2} - 2 \, a \cos \left (2 \, f x + 2 \, e\right ) + a\right )} f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2/(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="maxima")

[Out]

-2*(cos(f*x + e)*sin(2*f*x + 2*e) - cos(2*f*x + 2*e)*sin(f*x + e) + sin(f*x + e))*sqrt(a)/((a*cos(2*f*x + 2*e)
^2 + a*sin(2*f*x + 2*e)^2 - 2*a*cos(2*f*x + 2*e) + a)*f)

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 36, normalized size = 1.44 \begin {gather*} -\frac {\sqrt {a \cos \left (f x + e\right )^{2}}}{a f \cos \left (f x + e\right ) \sin \left (f x + e\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2/(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="fricas")

[Out]

-sqrt(a*cos(f*x + e)^2)/(a*f*cos(f*x + e)*sin(f*x + e))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot ^{2}{\left (e + f x \right )}}{\sqrt {- a \left (\sin {\left (e + f x \right )} - 1\right ) \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**2/(a-a*sin(f*x+e)**2)**(1/2),x)

[Out]

Integral(cot(e + f*x)**2/sqrt(-a*(sin(e + f*x) - 1)*(sin(e + f*x) + 1)), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 67 vs. \(2 (25) = 50\).
time = 0.57, size = 67, normalized size = 2.68 \begin {gather*} \frac {\frac {\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right )} + \frac {1}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right ) \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}}{2 \, \sqrt {a} f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2/(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="giac")

[Out]

1/2*(tan(1/2*f*x + 1/2*e)/sgn(tan(1/2*f*x + 1/2*e)^4 - 1) + 1/(sgn(tan(1/2*f*x + 1/2*e)^4 - 1)*tan(1/2*f*x + 1
/2*e)))/(sqrt(a)*f)

________________________________________________________________________________________

Mupad [B]
time = 15.06, size = 37, normalized size = 1.48 \begin {gather*} -\frac {\sqrt {2\,a\,\left (\cos \left (2\,e+2\,f\,x\right )+1\right )}}{a\,f\,\sin \left (2\,e+2\,f\,x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^2/(a - a*sin(e + f*x)^2)^(1/2),x)

[Out]

-(2*a*(cos(2*e + 2*f*x) + 1))^(1/2)/(a*f*sin(2*e + 2*f*x))

________________________________________________________________________________________